package com.xbj.dao;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.xbj.model.News;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by JzzZ
 * Date: 2018\7\5 0005
 * Time: 15:27
 * Project: News2.0
 * File description:
 */
@Repository
public class NewsDaoImpl implements NewsDao{

    @Autowired
    SqlSessionTemplate sessionTemplate;

    @Override
    public List<News> selectNews() {
        List<News> newsList = sessionTemplate.selectList("com.xbj.model.NewsMapper.selectNews");
        return newsList;
    }
}
